home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / 2Dwrap / README < prev   
Encoding:
Text File  |  1996-11-11  |  1.3 KB  |  36 lines

  1.  
  2.              toolbox/src/exampleCode/opengl/2Dwrap README
  3.  
  4.  
  5.        2Dwrap is a layer which will enable you to port 2d primitive
  6.        calls (arc,circle,rectangle,sbox)  from IrisGL to OpenGL.
  7.        
  8.        Why do you need 2DWRAP?
  9.        -----------------------
  10.        
  11.        For porting rectangles, you may try to use the openGL call
  12.        glRect(), but you have to keep track of the current polygon 
  13.        mode. glRect() will draw filled or plain rectangles depending 
  14.        upon the polygon mode. Querying and setting polygon modes
  15.        could be expensive. OpenGL does not provide separate calls
  16.        for filled and unfilled rectangles (like rect and rectf in 
  17.        IrisGL).
  18.        
  19.        There's no sbox() equivalent in openGL and using glRect()
  20.        will have similar performance issues (see reason above).
  21.        
  22.        For arcs, you may use gluPartialDisk(). But it draws 2 radial
  23.        lines (like pacman) at the end of arcs. Also it does some 
  24.        checking for different state variables. The routine in the 
  25.        wrapper layer could be tuned to the application needs.
  26.        
  27.        The 2 directories igl and ogl are IrisGL and openGL 
  28.        equivalents of the same program.
  29.        
  30.        
  31.        --
  32.        
  33.        Yusuf Attarwala
  34.        yusuf@engr.sgi.com
  35.        
  36.